// 简单的API测试脚本
const axios = require('axios');

const API_BASE_URL = 'http://localhost:5114/api';

async function testAPI() {
  try {
    console.log('测试API连接...');
    
    // 测试登录接口
    const loginResponse = await axios.post(`${API_BASE_URL}/auth/login`, {
      account: 'test',
      password: 'test123'
    });
    
    console.log('登录响应:', loginResponse.data);
    
    // 测试项目列表接口
    const projectResponse = await axios.post(`${API_BASE_URL}/project/getList`, {
      pageDto: {
        pageNumber: 1,
        pageSize: 10
      }
    });
    
    console.log('项目列表响应:', projectResponse.data);
    
  } catch (error) {
    console.error('API测试失败:', error.response?.data || error.message);
  }
}

testAPI();
